<template>
  <el-descriptions :column="4" border>
    <el-descriptions-item
      label="公司注册名称"
      :span="2"
      label-align="right"
      :width="200"
    >
      {{ accountInfo.enterpriseName }}
    </el-descriptions-item>
    <el-descriptions-item
      label="公司邮箱"
      :span="2"
      label-align="right"
      :width="200"
    >
      {{ accountInfo.email }}
    </el-descriptions-item>
    <el-descriptions-item label="官方网址" :span="2" label-align="right">
      {{ accountInfo.promotionLink }}
    </el-descriptions-item>
    <el-descriptions-item label="账户时区" :span="2" label-align="right">
      {{ accountInfo?.mediaMeta?.accountTimeZone }}
    </el-descriptions-item>
    <el-descriptions-item label="公共主页链接" :span="2" label-align="right">
      {{ accountInfo?.mediaMeta?.homepageLink }}
    </el-descriptions-item>
    <el-descriptions-item label="Meta应用的编号" :span="2" label-align="right">
      {{ accountInfo?.mediaMeta?.metaNumber }}
    </el-descriptions-item>
    <el-descriptions-item label="预存金额" :span="2" label-align="right">
      {{ accountInfo?.mediaMeta?.prestorePrice }}
    </el-descriptions-item>
    <el-descriptions-item label="营业执照附件" :span="2" label-align="right">
      <div class="license-box">
        <el-image
          v-if="accountInfo.businessLicenseUrl"
          :src="`${IMAGE_URL}${accountInfo.businessLicenseUrl}`"
          fit="cover"
        />
        <div v-else class="license-placeholder" />
      </div>
    </el-descriptions-item>
    <el-descriptions-item label="联系人" :span="2" label-align="right">
      {{ accountInfo.contactName }}
    </el-descriptions-item>
    <el-descriptions-item label="电话" :span="2" label-align="right">
      {{ accountInfo.contactPeople }}
    </el-descriptions-item>
  </el-descriptions>
</template>

<script setup>
import { IMAGE_URL } from "@/const/index.ts";
const { proxy } = getCurrentInstance();

const { bus_system_type, bus_approval_status, bus_currency_type } =
  proxy.useDict("bus_system_type", "bus_approval_status", "bus_currency_type");

const props = defineProps({
  accountInfo: {
    type: Object,
    default: () => ({}),
  },
});
</script>

<style lang="scss">
.license-box {
  padding: 8px 0;
  .license-placeholder {
    width: 120px;
    height: 120px;
    background: #f0f2f5;
    border: 1px solid #e5e7eb;
  }
}
</style>
